import request from '@/utils/request'

export default {
  wxpay(orderId:any){
    return request({
      url: `/api/order/weixin/createNative/${orderId}`,
      method: 'get',
    })
  },
  searchOrder(data:any){
    return request({
      url: `/api/order/weixin/queryPayStatus/${data}`,
      method: 'get',
    })
  },
  createOrder(data:any){
    return request({
      url: `/orderinfo/unificationOrder`,
      method: 'post',
      data
    })
  },
  createBalanceOrder(data: any){
    return request({
      url: `/orderinfo/createOrder`,
      method: 'post',
      data
    })
  },
  allGood(data?:any){
    return request({
      url: `/goods/allGoods`,
      method: 'post',
    })
  },
  changeGood(data:any){
    return request({
      url: `/goods/changeGood`,
      method: 'put',
    })
  },
  alipay(orderId:any){
    return request({
      url: `/alipay/unifiedOrder/${orderId}`,
      method: 'get',
    })
  },
  searchAliOrder(orderId:any){
    return request({
      url: `/alipay/queryOrder/${orderId}`,
      method: 'get',
    })
  },
  getUserInfo(){
    return request({
      url: `/user/getMyUserInfo`,
      method: 'put',
    })
  }
}

